<template>
  <div
    :class="$style.bannerWrapper"
    v-analytics.click="{
      action: 'Banner Click',
      category: category,
      label: jumpContent,
      callback: jump,
    }"
  >
    <img :src="imageUrl" class="img-block">
  </div>
</template>
<script>
export default {
  name: 'Banner',
  props: {
    imageUrl: String,
    jumpContent: String,
    category: String,
  },
  methods: {
    jump() {
      location.href = this.jumpContent
    },
  },
}
</script>

<style lang="scss" module>
  .bannerWrapper {
    height: auto;
    margin-bottom: 4px;
  }
</style>
